package com.zxkj.login.model.response;

import com.czy.basecommon.utils.tools.TimeTool;
import com.czy.basecommon.utils.tools.TimeUtil;

import java.text.ParseException;

public class TimelineData {
    public long date;
    public String place;
    public String location;
    public int type;
    public int status;
    public int result;
    public long startTime;
    public String code;

    public int getLayoutType() {
        return layoutType;
    }

    public void setLayoutType(int layoutType) {
        this.layoutType = layoutType;
    }

    public int layoutType;
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public TimelineData(long date, String place, String location, int type, int status, int result, long startTime) {
        this.date = date;
        this.place = place;
        this.location = location;
        this.type = type;
        this.status = status;
        this.result = result;
        this.startTime = startTime;
    }

    public long getDate() {
        return date;
    }

    public void setDate(long date) {
        this.date = date;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public TimelineData() {
    }


    //将时间搓转换成年月日

    public int getYMD(){
        int l1=0;
        long l = TimeUtil.toTimestamp(startTime);
        try {

             l1 = (int) TimeUtil.parseTime_y(TimeTool.format(l, TimeTool.format1));

        } catch (ParseException e) {
            e.printStackTrace();
        }
      return l1;
    }

}
